package cn.edu.sjtu.literature.service.impl;

import cn.edu.sjtu.literature.service.LiteratureService;
import cn.edu.sjtu.literature.service.ServiceFactory;
import cn.edu.sjtu.literature.service.UserService;

public class DefaultServiceFactory implements ServiceFactory {

	private static DefaultServiceFactory serviceFactory = new DefaultServiceFactory();
	
	private UserService userService;
	
	private LiteratureService literatureService;
	
	private DefaultServiceFactory() {
		userService = new UserServiceImpl();
		literatureService = new LiteratureServiceImpl();
	}
	
	public static DefaultServiceFactory getInstance() {
		return serviceFactory;
	}
	
	public UserService getUserService() {
		return userService;
	}
	
	public LiteratureService getLiteratureService() {
		return literatureService;
	}
	
}
